For use with the CD ROM Cheat Code Patcher by: Tony H   11/18/2024


If you're having problems getting the cheat codes working that you patched into your PC Engine CD ROM, here's something that should work.  You can also use this method of you want to use a previously saved save state file.

Have only tested this with Mednafen, but might work with other emulators too.

Go to your Mednafen folder and open the mednafen.cfg file with notepad.  Search for "compression".  You should see something like this:

;Save state file compression level.
filesys.state_comp_level 6

Change the 6 (or whatever number you have) to -1.  Should look like this:

;Save state file compression level.
filesys.state_comp_level -1

Save and exit the file.  This will turn off the compression that Mednafen normally uses when making a save state file.  If your cfg file looks different, see notes below.

Open Mednafen and start your game.  Get to a spot where you are actually playing the game and press F5 (this creates a save state).  IMPORTANT: You must make your save state after you've actually started playing the game.  Do NOT save your game at something like the title screen or the screen where you name your character.  Wait until you have control over your character.  Once you've pressed F5, exit Mednafen.

Go to your Mednafen folder and open the "mcs" folder.  Using my CD-ROM cheat code tool (or a hex editor), open your newly created save state file.  Search for the array of bytes for your cheat code.  You should find at least one match.  If you don't find any matches, that means either your save state file isn't uncompressed, or this method won't work for that cheat code.  Make the necessary changes and save the file, making sure NOT to change the name of the file (ie. make sure the "Create new ROM" box is unchecked).  You can add as many cheat codes as you want to this save state file.

You can now run your game in Mednafen and press f7 to load your patched save state file and your cheats should be working.  You may have to select which save state to load if you have more than one.

Do NOT reset the game, or else your cheat codes will be disabled.  If you do reset the game, reloading the patched save state will turn the cheat codes back on.

Any save states you make going forward should keep your cheat codes enabled.


NOTES:

If you have a previous save state file that's compressed, you can use a program like 7-zip to extract the file so you can patch it.  There's no need to re-compress when finished, since Mednafen will still recognize it.  Make sure that you do not change the name of the save state file.

------------------

Older versions of Mednafen use a different method of turning off save state compression:

;Disable gzip compression when saving save states and backup memory.
filesys.disablesavegz 0

Change the 0 to a 1, and mednafen will no longer compress your save state files.

------------------

Cheat codes like "Start a new game with ??? may not work, although you can experiment by making your save state before the game actually starts and see if that works.


